package com.foreveross.crawl.common.util;

import java.util.Random;

import com.foreveross.crawl.common.util.browser.BrowserVersionSub;
import com.gargoylesoftware.htmlunit.BrowserVersion;

/**
 * 随机浏览器版本
 * @author Administrator
 *
 */
public class RandomBrowserVersion {

	private static Random R=new Random();

	private static BrowserVersion[] BVS=new BrowserVersion[]{
		BrowserVersionSub.FIREFOX_30,
		BrowserVersionSub.FIREFOX_31,
		BrowserVersionSub.CHROME_36,
		BrowserVersionSub.INTERNET_EXPLORER_9, 
		BrowserVersionSub.INTERNET_EXPLORER_10, 
		BrowserVersionSub.INTERNET_EXPLORER_11
	};
	
	
	public static  synchronized BrowserVersion getBV(){
		return BVS[R.nextInt(BVS.length)];
	}
	
}
